package cn.chencaiju.algorithm;

import org.junit.Test;

public class LowerCase {
    public String toLowerCase(String str) {
    	StringBuilder sb=new StringBuilder();
        for(int i=0;i<str.length();i++) {
        	char temp=str.charAt(i);
        	if(temp>64&&temp<123) {
	        	if(temp<'a') {
	        		temp+=32;
	        	}
        	}
        	sb.append(temp);
        }
    	return sb.toString();
    }
    @Test public void testLowerCase() {
    	System.out.println(toLowerCase("Hel$lo2W"));
    	System.out.println((int)'A'+" "+(int)'z');
    }
}
